#pragma once

#include "includeBase.h"

#include "models/BaseDocument.h"

#include "pcl/PclInclude.h"

class PclDefaultModel : public BaseDocument
{

public:
    PclDefaultModel();

public:
    static PclDefaultModel& get();

public: // IJsonSerializable
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    QJsonObject toJson() const override;

public: // Property
    QColor backgroundColor() const;
    void setBackgroundColor(const QColor& backgroundColor);

    int pointSize() const;
    void setPointSize(int pointSize);

    QColor pointColor() const;
    void setPointColor(const QColor& pointColor);

    bool showCoordinate() const;
    void setShowCoordinate(bool showCoordinate);

    double coordinateScale() const;
    void setCoordinateScale(double coordinateScale);

    vector<pcl::visualization::Camera>& cameras();

    QDateTime timestamp() const;
    void setTimestamp(const QDateTime& timestamp);

private:
    QColor backgroundColor_;
    int pointSize_;
    QColor pointColor_;
    bool showCoordinate_;
    double coordinateScale_;

    vector<pcl::visualization::Camera> cameras_;

    QDateTime timestamp_;
};
